/*#include "HashTable.h"

HashTable::HashTable()
: m_hashTableSize(256)
, m_pHashTable(NULL)
{
	m_pHashTable = new HashNode[256];

	for(int i=0; i<m_hashTableSize; ++i)
	{
		m_pHashTable[i].key = -1;
		m_pHashTable[i].subIndex = 0;
		m_pHashTable[i].next = NULL;
	}
	int one = 1;
}
HashTable::~HashTable()
{
	//Check how to clean up properly
	
}
bool HashTable::AddNode(char* a_value)
{
	//Make sure a value was passed in
	if(a_value == NULL)
		return false;

	//Get the hashed key
	int key = Hash(a_value);

	//If the spot in the array is already taken..
	if(m_pHashTable[key].key != -1)
	{
		HashNode* curNode = m_pHashTable[key].next;
		//Find the node at the end of the sub list
		while(curNode != NULL)
		{
			//go to next node
			curNode = curNode->next;
		}
		//Create new sub node
		HashNode* pNewNode = new HashNode();
		pNewNode->key = key;
		pNewNode->subIndex = SubHash(a_value);
		pNewNode->next = NULL;

		//Assign to previous node
		m_pHashTable[key].next = pNewNode;

		return true;
	}

	//No need to search through sub nodes, just create one
	HashNode newNode;
	newNode.key = key;
	newNode.subIndex = 0;
	newNode.next = NULL;
	m_pHashTable[key] = newNode;

	return true;
}
bool HashTable::RemoveNode(char* a_value)
{
	//needs to be changed to work with sub indexes
	/*int key = Find(a_value);
	if(m_pHashTable[key] != NULL)
	{	
		delete m_pHashTable[key];
		m_pHashTable[key] = NULL;
		return true;
	}*/
	/*return false;
}
int HashTable::Find(char* a_value)
{
	//find the hash to get the first index, then get the second index by hashing the value with something else to get a subindex

	//Make sure a value was passed in
	if(a_value == NULL)
		return false;

	//Get the hashed key
	int key = Hash(a_value);

	if(m_pHashTable[key].key != -1)
	{
		int subKey = SubHash(a_value);
		if(m_pHashTable[key].subIndex != subKey)
		{
			//Has sub items, search for the correct one
			HashNode* curNode = m_pHashTable[key].next;
			//search for the sub item with the same sub index as the subhash function
			while(curNode->subIndex != subKey)
			{
				//go to next node
				curNode = curNode->next;
			}
			//Found the subitem with the same sub index, so now return its key
			return curNode->key;
		}
		else
		{
			//No sub items, just return the key
			return m_pHashTable[key].key;
		}
	}
	//Return minus 1, 0 is a valid hash
	return -1;
}
const unsigned int HashTable::Hash(const char* a_pKey)
{
	int sum = 0;
	int i = 0;
	while(a_pKey[i])
	{
		sum += a_pKey[i++];
	}
	return sum % 256;
}
const unsigned int HashTable::SubHash(const char* a_pKey)
{
	int sum = 0;
	int i = 0;
	while(a_pKey[i])
	{
		sum += a_pKey[i+=2];
	}
	return sum % 256;
}*/